all:
	gcc -o md5 *.c -lrt

test_0:
	@for index in 1 2 3 4 5 6 7 8; do \
		echo "---------- Test Nr. 0.$$index" ;\
		./md5 -c ./tests/0/chunks$$index.txt -s ./tests/0/sizes$$index.txt; \
	done

test_1:
	@for index in 1 2 3 ; do \
	    	echo "---------- Test Nr. 1.$$index" ; \
		./md5 -c ./tests/1/chunks$$index.txt -s ./tests/1/requests$$index.txt ; \
	done

test_2:

test_3:
	@for index in 1 2 3 4 5 6 7 ; do \
		echo "---------- Test Nr. 3.$$index" ; \
		./md5 -c ./tests/3/mem$$index -s ./tests/3/in$$index ; \
	done

test_4:
	@echo "---------- Test Nr. 4.1"
	@./md5 -c ./tests/4/chunk_file.txt -s ./tests/4/request_file.txt
	@echo "---------- Test Nr. 4.2"
	@./md5 -c ./tests/4/chunks_similar_size_40pc_free.txt -s ./tests/4/requests_similar_size_40pc_free.txt
	@echo "---------- Test Nr. 4.3"
	@./md5 -c ./tests/4/chunk-variants2.txt -s ./tests/4/request-variants2.txt

test_5:
	@for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 ; do \
		echo "---------- Test Nr. 5.$$index" ; \
		./md5 -c ./tests/5/$$indexchunks -s ./tests/5/$$indexsizes ; \
	done

test: test_1 test_3 test_4 test_5 test_0
